import request from '@/utils/request'

// 查询费用报销列表
export function listFinanceSubmit(query) {
  return request({
    url: '/oa/financeSubmit/list',
    method: 'get',
    params: query
  })
}

// 查询费用报销详细
export function getFinanceSubmit(id) {
  return request({
    url: '/oa/financeSubmit/' + id,
    method: 'get'
  })
}

// 新增费用报销
export function addFinanceSubmit(data) {
  return request({
    url: '/oa/financeSubmit',
    method: 'post',
    data: data
  })
}

// 修改费用报销
export function updateFinanceSubmit(data) {
  return request({
    url: '/oa/financeSubmit',
    method: 'put',
    data: data
  })
}

// 删除费用报销
export function delFinanceSubmit(id) {
  return request({
    url: '/oa/financeSubmit/' + id,
    method: 'delete'
  })
}

// 获取没有采购流程的项目信息
export function getProjectList() {
    return request({
        url: '/oa/financeSubmit/getProjectList',
        method: 'get'
    })
}

export function queryFinanceSubmitByProjectName(data) {
  return request({
    url: '/oa/financeSubmit/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}

